package com.keyroy.game.puzzle_rpg.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Spinner;

public class RoleBaseParamView extends Composite {

	public RoleBaseParamView(Composite parent) {
		super(parent, SWT.BORDER);
		setLayout(new FormLayout());
		
		Label lblNewLabel = new Label(this, SWT.NONE);
		FormData fd_lblNewLabel = new FormData();
		fd_lblNewLabel.top = new FormAttachment(0, 10);
		fd_lblNewLabel.left = new FormAttachment(0, 10);
		lblNewLabel.setLayoutData(fd_lblNewLabel);
		lblNewLabel.setText("\u529B\u91CF :");
		
		Spinner strength = new Spinner(this, SWT.BORDER);
		FormData fd_strength = new FormData();
		fd_strength.right = new FormAttachment(100, -10);
		fd_strength.top = new FormAttachment(0, 7);
		fd_strength.left = new FormAttachment(0, 47);
		strength.setLayoutData(fd_strength);
		
		Label lblNewLabel_1 = new Label(this, SWT.NONE);
		FormData fd_lblNewLabel_1 = new FormData();
		fd_lblNewLabel_1.top = new FormAttachment(lblNewLabel, 12);
		fd_lblNewLabel_1.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);
		lblNewLabel_1.setLayoutData(fd_lblNewLabel_1);
		lblNewLabel_1.setText("\u654F\u6377 : ");
		
		Spinner dex = new Spinner(this, SWT.BORDER);
		FormData fd_dex = new FormData();
		fd_dex.right = new FormAttachment(100, -10);
		fd_dex.top = new FormAttachment(0, 36);
		fd_dex.left = new FormAttachment(0, 47);
		dex.setLayoutData(fd_dex);
		
		Label label = new Label(this, SWT.NONE);
		label.setText("\u667A\u6167 : ");
		FormData fd_label = new FormData();
		fd_label.top = new FormAttachment(lblNewLabel_1, 12);
		fd_label.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);
		label.setLayoutData(fd_label);
		
		Spinner knowl = new Spinner(this, SWT.BORDER);
		FormData fd_knowl = new FormData();
		fd_knowl.left = new FormAttachment(0, 47);
		fd_knowl.top = new FormAttachment(0, 65);
		fd_knowl.right = new FormAttachment(100, -10);
		knowl.setLayoutData(fd_knowl);
		
		Label label_1 = new Label(this, SWT.NONE);
		label_1.setText("\u4F53\u529B : ");
		FormData fd_label_1 = new FormData();
		fd_label_1.top = new FormAttachment(label, 12);
		fd_label_1.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);
		label_1.setLayoutData(fd_label_1);
		
		Spinner vita = new Spinner(this, SWT.BORDER);
		FormData fd_vita = new FormData();
		fd_vita.left = new FormAttachment(strength, 0, SWT.LEFT);
		fd_vita.top = new FormAttachment(knowl, 6);
		fd_vita.right = new FormAttachment(strength, 0, SWT.RIGHT);
		vita.setLayoutData(fd_vita);
		
		Label label_2 = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
		FormData fd_label_2 = new FormData();
		fd_label_2.right = new FormAttachment(100, -10);
		fd_label_2.top = new FormAttachment(0, 123);
		fd_label_2.left = new FormAttachment(0, 10);
		label_2.setLayoutData(fd_label_2);
		
		Label lblNewLabel_2 = new Label(this, SWT.NONE);
		FormData fd_lblNewLabel_2 = new FormData();
		fd_lblNewLabel_2.top = new FormAttachment(label_2, 9);
		fd_lblNewLabel_2.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);
		lblNewLabel_2.setLayoutData(fd_lblNewLabel_2);
		lblNewLabel_2.setText("\u751F\u547D : ");
		
		Spinner life = new Spinner(this, SWT.BORDER);
		life.setEnabled(false);
		FormData fd_life = new FormData();
		fd_life.right = new FormAttachment(strength, 0, SWT.RIGHT);
		fd_life.top = new FormAttachment(label_2, 6);
		fd_life.left = new FormAttachment(strength, 0, SWT.LEFT);
		life.setLayoutData(fd_life);
		
		Label label_3 = new Label(this, SWT.NONE);
		label_3.setText("\u901F\u5EA6 : ");
		FormData fd_label_3 = new FormData();
		fd_label_3.top = new FormAttachment(lblNewLabel_2, 12);
		fd_label_3.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);
		label_3.setLayoutData(fd_label_3);
		
		Spinner speed = new Spinner(this, SWT.BORDER);
		speed.setEnabled(false);
		FormData fd_speed = new FormData();
		fd_speed.top = new FormAttachment(life, 6);
		fd_speed.right = new FormAttachment(strength, 0, SWT.RIGHT);
		fd_speed.left = new FormAttachment(strength, 0, SWT.LEFT);
		speed.setLayoutData(fd_speed);

	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}
}
